package kr.pe.johnkim.pushchat.mobile.service;

import kr.pe.johnkim.pushchat.mobile.dao.PushChatRecommendationDao;
import kr.pe.johnkim.pushchat.mobile.domain.PushChatRecommendation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author : John_Kim <cale9797@gmail.com>
 * @date : 13. 7. 4.
 */
@Service
public class PushChatRecommendationServiceImpl implements PushChatRecommendationService {

    // SLF4J Logging
    private Logger logger = LoggerFactory.getLogger(PushChatDiaryServiceImpl.class);

    @Autowired
    private PushChatRecommendationDao pushChatRecommendationDao;


    /**
     * 좋아요 중복을 확인 한다.
     *
     * @param pushChatRecommendation
     * @return
     */
    @Override
    public PushChatRecommendation selectDuplicationRecommendation(PushChatRecommendation pushChatRecommendation) {
        logger.info("selectDuplicationRecommendation");
        return this.pushChatRecommendationDao.selectDuplicationRecommendation(pushChatRecommendation);
    }

    /**
     * 좋아요를 등록 한다.
     *
     * @param pushChatRecommendation
     */
    @Override
    public void registerRecommendation(PushChatRecommendation pushChatRecommendation) {
        logger.info("registerRecommendation");
        this.pushChatRecommendationDao.registerRecommendation(pushChatRecommendation);
    }
}
